package business;

import java.io.IOException;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jdo.Member;
import util.PMF;

@SuppressWarnings("serial")
public class SelectMemberEntityServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
		PersistenceManager pm = PMF.createManager();
		Member member1 = pm.getObjectById(Member.class, "gae1");
		Member member2 = pm.getObjectById(Member.class, "gae2");
		try {
			resp.setContentType("text/plain");
			resp.getWriter().println("member1.getEmail() = " + member1.getEmail() + ".");
			resp.getWriter().println("member2.getEmail() = " + member2.getEmail() + ".");
		} finally {
			pm.close();
		}
	}
}
